The present invention is generally related to graphical image manipulation systems, and more particularly to a method for compositing multiple graphical images.
Many graphical image manipulation computer programs, such as Adobe(copyright) Photoshop(copyright) 4.0, from Adobe Systems Incorporated, of San Jose, Calif., build a final image by compositing several image layers together. The image layers may be thought of as stacked sheets of acetate. The density of the ink on the acetate controls the transparency of the sheet, i.e., the extent to which that sheet obscures the images from the underlying sheets. In the computer program, the color and density of the ink on the acetate sheet are represented by a color value and an opacity (orxe2x80x9calphaxe2x80x9d) value, respectively.
Each layer typically includes image data, an optional mask, and compositing controls. Typically, the image data is represented by an array of pixels, with each pixel having a color and, optionally, an opacity. Similarly, the mask is represented by an array of pixels, with each pixel having an opacity. Alternatively, the image data or the mask or both can be defined analytically, e.g., by using shape outlines, or by other functions which map positions to color and opacity. In addition, the image data and the mask can be dynamic, i.e., computed from other data at the time the layers are composited.
The compositing controls may include a transfer mode, also known as a blending mode. The transfer mode of an image layer determines how the color in the image layer mixes with the color accumulated from the underlying layers.
Image layers are generally composited in order from bottom to top. The general process for compositing an image layer begins with calculation of any dynamic data in the image layer, such as the color of the pixels in the image and the opacity of the pixels in the mask. Then, the opacity is determined for each pixel from the mask, the global opacity, if any, and the image data. Finally, the color of each pixel in the layer is combined with the color of the corresponding pixel in an accumulation buffer to generate a new composited color. The combination is controlled by the opacity of the pixel and the transfer mode.
Further information on compositing image layers may be found in commonly-owned U.S. patent application Ser. No. 08/703,024 filed Aug. 26, 1996 to Hamburg et al. for Adjustment Layers for Composited Image Manipulation, incorporated here by this reference.
In general, in one aspect, the invention provides methods and apparatus implementing a technique for creating transfer or blending functions defining blending modes for image processing. The identity of a first transfer mode function T1 and of a second transfer mode function T2 are obtained in a graphical image process system, and a new transfer mode is dynamically defined having a new transfer mode function T defined as a mathematical combination of the first transfer mode function and the second transfer mode function. Advantageous implementations of the invention include one or more of the following features. An interpolation value beta is obtained and the new transfer mode function may be an interpolated function T=T1xc3x97xcex2+T2xe2x88x92(1xe2x88x92xcex2). A third transfer mode function T3 is obtained and the new transfer mode function may be a composite function T=T3(T1, T2). The identities of the first transfer mode function and the second transfer mode function are obtained interactively from a user operating the system. The value of beta is obtained interactively from a user operating the system. The system implementing the technique displays a dialog window in a graphical user interface and enables the user to identify the first transfer mode function and the second transfer mode function from a set of known transfer modes. The new transfer mode defined by the new transfer mode function is added to the set of known transfer modes. The system enables a user of the system to elect interactively to define a new interpolated transfer mode function or a new composite transfer mode function. The technique may be implemented as program instructions tangibly embodied on a computer-readable storage medium.
In general, in another aspect, the invention provides methods and apparatus implementing a technique for blending image layer data. The technique includes receiving a definition of a first layer of an image, the definition including a solidity parameter beta, in the range zero to one inclusive, and a transfer mode, the transfer mode having a transfer mode function T2; and blending the first layer with a second layer using a blending function T satisfying the equation T=normal(lower, upper)xc3x97xcex2+T2(lower, upper)xc3x97(1xe2x88x92xcex2P). Advantageous implementations of the invention include one or more of the following features. The definition of the first layer includes a mapping data mapping positions in the layer to solidity parameter values xcex2, and the value of xcex2 used in evaluating T for a position in the layer is found using the mapping data. The mapping data is a mask associated with the first layer. The mapping data is represented analytically. The mapping data is represented in raster form. The position in the layer is a pixel position; and the mask has a bit depth of at least 8 bits.
Among the advantages of the invention are one or more of the following. A user can define new transfer modes without having to write equations. New transfer modes can be created easily. Transfer mode functions can easily be used as generator functions to build an ever increasing set of transfer modes. With the addition of solidity masks, significant new effects become available: for example, blending can be changed by area in a straightforward manner. In addition, solidity masks enable the user to create smooth and subtle transitions from one sort of blending to another.
Other features and advantages of the invention will become apparent from the following description and from the claims.